package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QMenu1Mapper;
import com.ruoyi.system.domain.QMenu1;
import com.ruoyi.system.service.IQMenu1Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 顶层菜单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-14
 */
@Service
public class QMenu1ServiceImpl implements IQMenu1Service 
{
    @Autowired
    private QMenu1Mapper qMenu1Mapper;

    /**
     * 查询顶层菜单
     * 
     * @param qId 顶层菜单主键
     * @return 顶层菜单
     */
    @Override
    public QMenu1 selectQMenu1ByQId(Long qId)
    {
        return qMenu1Mapper.selectQMenu1ByQId(qId);
    }

    /**
     * 查询顶层菜单列表
     * 
     * @param qMenu1 顶层菜单
     * @return 顶层菜单
     */
    @Override
    public List<QMenu1> selectQMenu1List(QMenu1 qMenu1)
    {
        return qMenu1Mapper.selectQMenu1List(qMenu1);
    }

    /**
     * 新增顶层菜单
     * 
     * @param qMenu1 顶层菜单
     * @return 结果
     */
    @Override
    public int insertQMenu1(QMenu1 qMenu1)
    {
        return qMenu1Mapper.insertQMenu1(qMenu1);
    }

    /**
     * 修改顶层菜单
     * 
     * @param qMenu1 顶层菜单
     * @return 结果
     */
    @Override
    public int updateQMenu1(QMenu1 qMenu1)
    {
        return qMenu1Mapper.updateQMenu1(qMenu1);
    }

    /**
     * 批量删除顶层菜单
     * 
     * @param qIds 需要删除的顶层菜单主键
     * @return 结果
     */
    @Override
    public int deleteQMenu1ByQIds(String qIds)
    {
        return qMenu1Mapper.deleteQMenu1ByQIds(Convert.toStrArray(qIds));
    }

    /**
     * 删除顶层菜单信息
     * 
     * @param qId 顶层菜单主键
     * @return 结果
     */
    @Override
    public int deleteQMenu1ByQId(Long qId)
    {
        return qMenu1Mapper.deleteQMenu1ByQId(qId);
    }
}
